import Vue from "vue";
import Vuex from "vuex";

Vue.use(Vuex);

export default new Vuex.Store({
  state: {
    userInfo: {
      name: "绝世的容颜",
      avatar: require("../assets/images/avatar.png"),
      email: "123456789@gmail.com",
      phone: "13712341234",
      address: "地球",
      introduction:
        "本站点是个人网站<br/>主要是为了探索和分享一些个人的知识和技术<br/>欢迎大家访问",
      posts: 21,
      followers: 223,
      following: 10,
    },
  },
  getters: {
    userInfo: (state) => state.userInfo,
  },
  mutations: {
    setUserInfo(state, userInfo) {
      state.userInfo = userInfo;
    },
  },
  actions: {
  },
  modules: {},
});
